package com.snack.common.utils;

import java.util.Random;

public class RandomUtils
{
  public static final Random RANDOM = new Random(System.currentTimeMillis());

  public static int nextInt()
  {
    return nextInt(RANDOM);
  }

  public static int nextInt(Random random)
  {
    return random.nextInt();
  }

  public static int nextInt(int n)
  {
    return nextInt(RANDOM, n);
  }

  public static int nextInt(Random random, int n)
  {
    return random.nextInt(n);
  }

  public static long nextLong()
  {
    return nextLong(RANDOM);
  }

  public static long nextLong(Random random)
  {
    return random.nextLong();
  }

  public static boolean nextBoolean()
  {
    return nextBoolean(RANDOM);
  }

  public static boolean nextBoolean(Random random)
  {
    return random.nextBoolean();
  }

  public static float nextFloat()
  {
    return nextFloat(RANDOM);
  }

  public static float nextFloat(Random random)
  {
    return random.nextFloat();
  }

  public static double nextDouble()
  {
    return nextDouble(RANDOM);
  }

  public static double nextDouble(Random random)
  {
    return random.nextDouble();
  }
}
